<?php
class Mobile_FacebookController extends  Zend_Controller_Action{
	var $facebook;
	public function init(){
		parent::init();
		$this->facebook = new Facebook_Facebook(array(
				'appId' => 'YOUR_APP_ID',
				'secret' => 'YOUR_APP_SECRET',
		));
		$this->user = $this->facebook->getUser();
	}
	public function loginAction(){
		if($this->_request->isPost()){
			//check validate error tu form
				$a = Zend_Auth::getInstance();
				$auth = new Zgome_Auth();
				Zend_Debug::dump($this->_request->getParams());
 				if($auth->login($this->_request->getParams()) == true){
 					Zend_Debug::dump($a->getStorage()->read());
 				}
// 				else echo "false";
 			}
		}
		
	public function logoutAction(){
		$auth = new Qhuyonline_System_Auth();
		$auth->logout();
		$this->_redirect('/default');
	}
}